# Replication Package: Societal Orientation in AI Research

## Overview

This repository contains all code and data necessary to replicate the analyses presented in our manuscript on societal orientation and interdisciplinarity in AI research. The analyses include data processing, main descriptive and regression results, and robustness checks.

---

## Structure

```
├── 1_data_processing.ipynb
├── 2_analysis_and_graphics.ipynb
├── 3_robustness_FOS.ipynb
├── 4_robustness_classifiersensitivity.ipynb
├── Data/
├── Graphics/
├── environment.yml
```

---

## Notebooks

### 1. `1_data_processing.ipynb`

- Loads and preprocesses sentence-level data with classifier predictions.
- Merges sentence-level societal orientation scores into paper-level metadata.
- Produces the main dataset used in all subsequent analyses.

### 2. `2_analysis_and_graphics.ipynb`

- Generates the main descriptive plots (e.g., average societal orientation by team type).
- Runs the main panel regressions linking team composition to societal orientation.
- Produces graphics used in the main text.

### 3. `3_robustness_FOS.ipynb`

- Tests robustness of results to alternative author field-of-study assignment thresholds (e.g., 80%, 75%).
- Generates plots and tables presented in the appendix.

### 4. `4_robustness_classifiersensitivity.ipynb`

- Tests robustness to different classifier probability thresholds for defining "societal" sentences (e.g., 0.6, 0.8).
- Generates supplemental figures and regression results.

---

## Data

- **Data/** folder contains preprocessed datasets needed to run the notebooks.  
- Sentence-level data and paper-level metadata must be placed in this folder if re-running from raw data.

---

## Graphics

- **Graphics/** folder stores output figures generated by the notebooks.
- Figures are saved automatically when running the code.

---

## Environment

To reproduce the exact environment:

```bash
conda env create -f environment.yml
conda activate societal_influence_env
```

Alternatively, you can install individual packages listed in `environment.yml`.

---

## Running the Code

1. Clone or download the repository.
2. Create the Conda environment from `environment.yml`.
3. Open each notebook in order (`1_data_processing.ipynb` → `4_robustness_classifiersensitivity.ipynb`).
4. Execute the cells step by step. Outputs (figures and tables) will be saved in `Graphics/`.

---

## Contact

No contact information is provided as the package is currently released anonymously.

